package interview;

import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;

public class TestRunner {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		for (String className : args) {
			try {
				Class<?> targetClass = Class.forName("interview." + className);
				Result result = JUnitCore.runClasses(targetClass);
				for (Failure failure : result.getFailures()) {
					System.out.println(failure.toString());
				}
			} catch (ClassNotFoundException e) {
				e.printStackTrace();
			}
		}
	}

}
